﻿using System;

namespace Customs.Components.KDT.Khac.Info
{
    public class HangMauDichInfo
    {
        protected long _SoTiepNhan;
        protected string _MaHaiQuan;
        protected int _NamTiepNhan;
        protected int _SoThuTuHang;
        protected string _MaHS = String.Empty;
        protected string _MaPhu = String.Empty;
        protected string _TenHang = String.Empty;
        protected string _NuocXX_ID = String.Empty;
        protected string _DVT_ID = String.Empty;
        protected decimal _SoLuong;
        protected string _MA_NPL_SP = String.Empty;
        protected decimal _DonGiaKB;
        protected decimal _DonGiaTT;
        protected decimal _TriGiaKB;
        protected decimal _TriGiaTT;
        protected decimal _TriGiaKB_VND;
        protected decimal _ThueSuatXNK;
        protected decimal _ThueSuatTTDB;
        protected decimal _ThueSuatGTGT;
        protected decimal _ThueXNK;
        protected decimal _ThueTTDB;
        protected decimal _ThueGTGT;
        protected decimal _PhuThu;
        protected decimal _TyLeThuKhac;
        protected decimal _TriGiaThuKhac;
        protected string _maDG;
        protected byte _MienThue;        
        #region Thuộc tính
        public string MaDG
        {
            set { this._maDG = value; }
            get { return this._maDG; }
        }

        public int SoThuTuHang
        {
            set { this._SoThuTuHang = value; }
            get { return this._SoThuTuHang; }
        }

        public string MA_NPL_SP
        {
            set { this._MA_NPL_SP = value; }
            get { return this._MA_NPL_SP; }
        }

        public string MaHS
        {
            set { this._MaHS = value; }
            get { return this._MaHS; }
        }

        public string MaPhu
        {
            set { this._MaPhu = value; }
            get { return this._MaPhu; }
        }

        public string TenHang
        {
            set { this._TenHang = value; }
            get { return this._TenHang; }
        }

        public string NuocXX_ID
        {
            set { this._NuocXX_ID = value; }
            get { return this._NuocXX_ID; }
        }

        public string DVT_ID
        {
            set { this._DVT_ID = value; }
            get { return this._DVT_ID; }
        }

        public decimal SoLuong
        {
            set { this._SoLuong = value; }
            get { return this._SoLuong; }
        }

     

        public decimal DonGiaKB
        {
            set { this._DonGiaKB = value; }
            get { return this._DonGiaKB; }
        }

        public decimal DonGiaTT
        {
            set { this._DonGiaTT = value; }
            get { return this._DonGiaTT; }
        }

        public decimal TriGiaKB
        {
            set { this._TriGiaKB = value; }
            get { return this._TriGiaKB; }
        }

        public decimal TriGiaTT
        {
            set { this._TriGiaTT = value; }
            get { return this._TriGiaTT; }
        }

        public decimal TriGiaKB_VND
        {
            set { this._TriGiaKB_VND = value; }
            get { return this._TriGiaKB_VND; }
        }

        public decimal ThueSuatXNK
        {
            set { this._ThueSuatXNK = value; }
            get { return this._ThueSuatXNK; }
        }

        public decimal ThueSuatTTDB
        {
            set { this._ThueSuatTTDB = value; }
            get { return this._ThueSuatTTDB; }
        }

        public decimal ThueSuatGTGT
        {
            set { this._ThueSuatGTGT = value; }
            get { return this._ThueSuatGTGT; }
        }

        public decimal ThueXNK
        {
            set { this._ThueXNK = value; }
            get { return this._ThueXNK; }
        }

        public decimal ThueTTDB
        {
            set { this._ThueTTDB = value; }
            get { return this._ThueTTDB; }
        }

        public decimal ThueGTGT
        {
            set { this._ThueGTGT = value; }
            get { return this._ThueGTGT; }
        }

        public decimal PhuThu
        {
            set { this._PhuThu = value; }
            get { return this._PhuThu; }
        }

        public decimal TyLeThuKhac
        {
            set { this._TyLeThuKhac = value; }
            get { return this._TyLeThuKhac; }
        }

        public decimal TriGiaThuKhac
        {
            set { this._TriGiaThuKhac = value; }
            get { return this._TriGiaThuKhac; }
        }

        public byte MienThue
        {
            set { this._MienThue = value; }
            get { return this._MienThue; }
        }

        public long SoTiepNhan
        {
            get { return this._SoTiepNhan; }
            set { this._SoTiepNhan = value; }
        }

        public string MaHaiQuan
        {
            get { return this._MaHaiQuan; }
            set { this._MaHaiQuan = value; }
        }

        public int NamTiepNhan
        {
            get { return this._NamTiepNhan; }
            set { this._NamTiepNhan = value; }
        }

        #endregion

        #region Tính thuế

        public void TinhThue(decimal tygiaTT)
        {
            decimal dongia_TT = this._DonGiaKB*tygiaTT;
            decimal trigiaNT = this._DonGiaKB*this._SoLuong;
            decimal trigiaTT_XNK = (dongia_TT*this._SoLuong);
            decimal tienthue_XNK = trigiaTT_XNK*this._ThueSuatXNK/100;
            decimal tienthue_TTDB = (trigiaTT_XNK + tienthue_XNK)*this._ThueSuatTTDB/100;
            decimal tienthue_GTGT = (trigiaTT_XNK + tienthue_XNK + tienthue_TTDB)*this._ThueSuatGTGT/100;
            decimal tienthukhac = this._TyLeThuKhac*trigiaTT_XNK/100;

            this._DonGiaTT = dongia_TT;
            this._TriGiaKB = trigiaNT;
            this._TriGiaTT = trigiaTT_XNK;
            this._TriGiaKB_VND = trigiaNT*tygiaTT;
            this._ThueXNK = tienthue_XNK;
            this._ThueTTDB = tienthue_TTDB;
            this._ThueGTGT = tienthue_GTGT;
            this._TriGiaThuKhac = tienthukhac;
        }

        #endregion

        //---------------------------------------------------------------------------------------------
    }
}